Fix the fix to scrollbar computaaFix the fix to the fix for scrollbar computation.
authorJim Blandy <jimb@redhat.com>
Thu, 20 May 1993 23:15:17 +0000 (23:15 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 20 May 1993 23:15:17 +0000 (23:15 +0000)
src/xdisp.c

index f034bb203e6c3e289d4db433caf537eaed9b021d..b991aeb580511c143c6760927e9f662a5f317948 100644 (file)
@@ -1069,14 +1069,14 @@ done:
       if (! MINI_WINDOW_P (w)
          || (w == XWINDOW (minibuf_window) && ! echo_area_glyphs))
        {
+         whole = ZV - BEGV;
          start = startp - BEGV;
          /* I don't think this is guaranteed to be right.  For the
             moment, we'll pretend it is.  */
-         end = Z - XINT (w->window_end_pos) - BEGV;
-         whole = ZV - BEGV;
+         end = (Z - XINT (w->window_end_pos)) - BEGV;
 
          if (end < start) end = start;
-         if (whole > (end - start)) whole = end - start;
+         if (whole < (end - start)) whole = end - start;
        }
       else
        start = end = whole = 0;